package kayao.client.scene;

import kayao.client.scene.objects.PhysicalNode;

public class PhysicsController {
	static {
		System.loadLibrary("KayaoPhysics");
	}
	
	public static native void step(float stepTime);
	
	public static native void updateBody(PhysicalNode body, int id);
	
	public static native void setCarValues(int id, float positionX, float positionZ, float rotationY, float angularVelocity, float velocityX, float velocityZ);
	
	public static native void destroyBody(int id);

	public static native void createWorld(float minX, float minZ, float maxX, float maxZ);
	
	public static native int createDynamicBox(float x, float y, float sizeX, float sizeZ, float density, float restitution, float friction);

	public static native int createStaticBox(float x, float y, float sizeX, float sizeZ);
	
	public static native void performDeadReckoning(PhysicalNode body, float positionX, float positionZ, float rotationY, float angularVelocity, float velocityX, float velocityZ, float stepTime);
}
